package com.epoque.admin.ui.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Base64Utils;

import javax.servlet.http.HttpServletRequest;

/**
 * 
 * @ClassName: BaseController
 * @Description: 基础控制类
 * @author qiuxianfeng
 * @date 2018年8月29日
 *
 */
public class BaseController {
	
    @Autowired
    private HttpServletRequest request;
    
    public String getCurrentUserName(){
        String authorization = request.getHeader("Authorization");
        return new String(Base64Utils.decodeFromString(authorization));
    }
}
